#!/bin/bash

config_file="/Users/aron/softwares/GitAutoCommit/Config/AutoCommitConfig.txt"

for line in $(cat ${config_file} | sed 's/^[ \t]*//g')
do
	if [[ $(expr "$line" : '^#.*') -le 0 ]] ; then
		if [[ -d ${line} ]]; then
			cd ${line}
			git add .
			git commit -m "udpate"
			git push
		fi
	fi	
done

# test_file="/Users/aron/softwares/GitAutoCommit/MacTimerTask/test.txt"
# time=$(date "+%Y-%m-%d %H：%M：%S")
# echo "$time" >> ${test_file}